package com.haha.community.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.haha.community.entity.LoginTicket;
import com.haha.community.dao.LoginTicketMapper;
import com.haha.community.service.LoginTicketService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Yang
 * @since 2020-10-30
 */
@Service
public class LoginTicketServiceImpl extends ServiceImpl<LoginTicketMapper, LoginTicket> implements LoginTicketService {

    @Override
    public LoginTicket findLoginTicketByTicket(String ticket) {
        QueryWrapper<LoginTicket> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("ticket",ticket);
        return baseMapper.selectOne(queryWrapper);
    }
}
